using System;
using System.Collections.Generic;
using Synapse.Framework.IoC.Option;

namespace Synapse.Framework.IoC.Bind
{
    public interface IBinder
    {
        IOptions To(Type implementation);
    }

    public interface IBinder<in I>
    {
        IOptions To<T>() where T : class, I;
        IOptions To<T>(T instance) where T : class, I;
    }

    public interface IBinding
    {
        Type Contract { get; }
        IList<Implemetation> Implementations { get; }
    }
    public class Implemetation
    {
        public Implemetation(Type type)
        {
            Type = type;
        }

        public Type Type { get; private set; }
        public object InstanceDecorator { get; set; }
        public bool Default { get; set; }
        public bool IsNewInstance { get; set; }
        public object Instance { get; set; }
        public string Key { get; set; }
    }
}
